"""author: wangxin
   data: 2021/10/29
   project: children's game.py
"""
# 空气质量查询工具
# while 1:
#     a = input("请输入pm2.5的值:")
#     if a != 'Q':
#         if a.isdigit():
#             pm = int(a)
#             if 0 <= pm <= 50:
#                 print("空气质量为优")
#             elif 51 <= pm <= 100:
#                 print("空气质量为良")
#             elif 101 <= pm <= 150:
#                 print("空气质量为轻度污染")
#             elif 151 <= pm <= 200:
#                 print("空气质量为中度污染")
#             elif 201 <= pm <= 300:
#                 print("空气质量为重度污染")
#             elif pm > 300:
#                 print("空气质量为严重污染")
#         else:
#             print("输入不合法！")
#     else:
#         break

#  猜大小游戏plus
# import random
#
# glod_bean = 1000
# t = 0
# w = 0
# while glod_bean >= 100:
#     guess = input("请在键盘输入大或小:")
#     a = random.randint(1, 6)
#     b = random.randint(1, 6)
#     c = random.randint(1, 6)
#     sum = a + b + c
#     t += 1
#     if guess != "exit":
#         if (3 <= sum <= 10 and guess == "小") or (11 <= sum <= 18 and guess == "大"):
#             glod_bean += 100
#             w += 1
#             print("结果为", sum, "恭喜你猜中了！当前金豆为", glod_bean, "当前共猜中%d次" % (w))
#         else:
#             glod_bean -= 100
#             print("结果为", sum, "很遗憾你猜错了，当前金豆为", glod_bean)
#         win_rate = w / t * 100
#         print("共玩了", t, "次,""你的胜率为", win_rate, '%')
#     else:
#         break
# print("game over!")

# 千分位格式化
# num1 = input("请输入一个整数:")
# num2 = num1[::-1]
# num3 = ""
# for i in range(len(num2)):
#     if (i + 1) % 3 == 0 and i != (len(num2) - 1):
#         num3 += num2[i] + ','
#     else:
#         num3 += num2[i]
# print(num3[::-1])

# 九九乘法表
# for i in range(1, 10):
#     for j in range(1, i+1):
#         print(f'{j}x{i}={i*j}\t', end='')
#     print()



